UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'o09f4gGIyMKhYmcwbIYKm772Tlw9I13juqOVPGp6Pxw='
WHERE
key_id = '7720053c0e0206416a05d1938696bfd2aeb669c044e06dadec5a05893fa96c83'
AND (
token = 'o09f4gGIyMKhYmcwbIYKm772Tlw9I13juqOVPGp6Pxw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)