UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Qd7ynNV/j/t83dlKZ5zXYrObz1CXIstlYsd2WbVtB9Q='
WHERE
key_id = 'e4cffebf89ddfc0fc085b6b4e543f811760d8a4fa8f87c7954a1c469da28ddf1'
AND (
token = 'Qd7ynNV/j/t83dlKZ5zXYrObz1CXIstlYsd2WbVtB9Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)