UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fs7t2F9xJoLEwU1ihkUImh/pQzx/moZPHG5xUem1ih4='
WHERE
key_id = 'f30719e5169ca808dbcd8b61a7ac427d98fff3c883cd81caeb4ef0ebe51f2632'
AND (
token = 'fs7t2F9xJoLEwU1ihkUImh/pQzx/moZPHG5xUem1ih4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)