UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+/DFeEB1hTKFYPnylX/RCcZvL/J7vAeD0VxXZo5eQig='
WHERE
key_id = '48ce9d7ee2ec873ea193c449af19c460a7edc432bb7823d7f40c8504f78401f9'
AND (
token = '+/DFeEB1hTKFYPnylX/RCcZvL/J7vAeD0VxXZo5eQig='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)