UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zdrZW0rdqSiw/aaL5hmSuxxj7TsaVEZETwoxJWq5/fQ='
WHERE
key_id = '1e5c73bab05d4038fa6ea69dd2d2c52dad1eff9c05c0b448f457b1148687211b'
AND (
token = 'zdrZW0rdqSiw/aaL5hmSuxxj7TsaVEZETwoxJWq5/fQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)