UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IqcNkZAXeWxV6FxsZvtE2AR/QaOnZbYO+cz9l/zr+Ao='
WHERE
key_id = 'e3bba31b57ef263ddcde7a090ac7f11e42c31bf5d57d91ee5cc5a9dc1072e75c'
AND (
token = 'IqcNkZAXeWxV6FxsZvtE2AR/QaOnZbYO+cz9l/zr+Ao='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)