UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ya7znrXgeminFOW8FbbBCk+GGD5x8Nyaig1XlJILUbQ='
WHERE
key_id = '78c58a2c0de33822403ae0971b382fe7bad0e47f7bbe0ef4d4d4586434d3d94c'
AND (
token = 'ya7znrXgeminFOW8FbbBCk+GGD5x8Nyaig1XlJILUbQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)