UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9IfDDzfF8p9tU5MlvuKCRKOH8S75qRpHQDwgDHhsglw='
WHERE
key_id = '71d72ebb630dbd0dfade926c08801912627beb78701553c8baba3e313a5bed9c'
AND (
token = '9IfDDzfF8p9tU5MlvuKCRKOH8S75qRpHQDwgDHhsglw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)