UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8XfZLwYzi0TQa/YRDmV2BTr3Z02nth407cvwHIQ2TgM='
WHERE
key_id = '59faa29e97ee31ee3059fcbfb0ad87693eed33fa55876ae21639a8dffc54cc33'
AND (
token = '8XfZLwYzi0TQa/YRDmV2BTr3Z02nth407cvwHIQ2TgM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)