UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AOvPcWftcOu9k5SCyp4+hsq8xoI33DzuTMJN5ehdy2U='
WHERE
key_id = '235085339e01209bb1fabc1209ddd2a14a377af85d2b2b16fbc5cc5276f86968'
AND (
token = 'AOvPcWftcOu9k5SCyp4+hsq8xoI33DzuTMJN5ehdy2U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)