UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'g+eBCi/JxlOLAryzwjStoOR4zrGFPy0uvkoJWYmZTuU='
WHERE
key_id = 'aecd06469422a1bf0d15b4d296ac845994518644188b0451d5edc848b665ef70'
AND (
token = 'g+eBCi/JxlOLAryzwjStoOR4zrGFPy0uvkoJWYmZTuU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)