UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Fy+mApmDsvuOxKuYQHaArGlS0361lZoxgKD95piBE4Q='
WHERE
key_id = 'd3cff9b2830745b39d2a7538350dd1570d3f0ce2dab042af3b174193ebfa4e47'
AND (
token = 'Fy+mApmDsvuOxKuYQHaArGlS0361lZoxgKD95piBE4Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)