UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '66WSFQR/JjgIU3JfiKVOuDGqv515PWabtPCeBowPVbk='
WHERE
key_id = 'ca5f3aefe44742cb65ccef0965e244626278f5fc24def6002ef283d8b7e3d195'
AND (
token = '66WSFQR/JjgIU3JfiKVOuDGqv515PWabtPCeBowPVbk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)