UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'm/KYst04G7cyxl7364DQ4/8p17QMlqxy7WuN/+riZrU='
WHERE
key_id = '7b70b148a105abbc59ab0c4e23dca4d20bae1cdc203e54b0f7c48698ecfe710b'
AND (
token = 'm/KYst04G7cyxl7364DQ4/8p17QMlqxy7WuN/+riZrU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)