UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aqmLIVR3XSatarydCUmTSvdHcHAC/69iqj27SlSQWi8='
WHERE
key_id = '7ef9135e0a6f1ce6f8a35ccce6f61ed92e858686f7d85ac64be2eae0f01508c6'
AND (
token = 'aqmLIVR3XSatarydCUmTSvdHcHAC/69iqj27SlSQWi8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)