UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tMaPJO/bDWxFU4UeJwPTI53sOS2HpRmdCv8Bj/yVBhQ='
WHERE
key_id = '58532c1f7da3e6fea415825c4f0ab4de98b7152a9df78d373262638c5af2729f'
AND (
token = 'tMaPJO/bDWxFU4UeJwPTI53sOS2HpRmdCv8Bj/yVBhQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)