UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'G/e28FOChGnaVx3W4GRHXcKoIxq1/hQJl5gCnCdM7tY='
WHERE
key_id = '7f05998b94882ba64c50121b5e0d79572fbc5826136d8214ef9474431f32c521'
AND (
token = 'G/e28FOChGnaVx3W4GRHXcKoIxq1/hQJl5gCnCdM7tY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)