UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kibFgcGm+9suETMZrF1fSVgXkhotlB3aWzmmOVwIu/A='
WHERE
key_id = '760dcf42c980ad14d9df0145e84dbf990206128473980fe7d3361eecb743611e'
AND (
token = 'kibFgcGm+9suETMZrF1fSVgXkhotlB3aWzmmOVwIu/A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)