UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2pH2dP/XHh4s7Anc6jqVb7AwZqMNBwJBPW/dLqCPucE='
WHERE
key_id = '6cbd7481e4c52333163c7903009ee835352a160c59e023fadbc322e8385364b9'
AND (
token = '2pH2dP/XHh4s7Anc6jqVb7AwZqMNBwJBPW/dLqCPucE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)