UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GYVbdfh+o5+vHaX9u0kcF69Lo4CnMiaDMo3GZ0WzQYg='
WHERE
key_id = '1a1983e28c8cfbc5777bb0acc322c2bcc4a05b67ea941e38316b5bfd0ba068c1'
AND (
token = 'GYVbdfh+o5+vHaX9u0kcF69Lo4CnMiaDMo3GZ0WzQYg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)