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