UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QDJkc4NIKqFYQEBsnZ6mwr3J+mf3L6Ep2tJwWxtOILE='
WHERE
key_id = '2278da64ce5b67d9e8a7345440fdf7f9b558ca6ff1799f1adf25e421ca7b41bd'
AND (
token = 'QDJkc4NIKqFYQEBsnZ6mwr3J+mf3L6Ep2tJwWxtOILE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)