UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wV/tAsV6lFthAFA9AR41/AcBj09GoPBJ+JD7V1qGrAo='
WHERE
key_id = 'e759898a09623e1f9b2bae3c838d25ed2ba57f4acfbdac2b02454190c9c92740'
AND (
token = 'wV/tAsV6lFthAFA9AR41/AcBj09GoPBJ+JD7V1qGrAo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)