UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WlCAS9cIKoyl4AuzrNkumwLQf/PvSlIuhwFThkQdXlY='
WHERE
key_id = '6de00dc01d15602bb2b10caa26e3be4f271ffa851f3e8c8b1693b73e96906d09'
AND (
token = 'WlCAS9cIKoyl4AuzrNkumwLQf/PvSlIuhwFThkQdXlY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)