UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9ww+/MqnpHZp6zKp3bC7Fi7GOb5jTpOeK1Yyti6MvCk='
WHERE
key_id = '60b0abc1595ea5c142f2c23b3f103371447c0ede77600d9236b716bdabd7df74'
AND (
token = '9ww+/MqnpHZp6zKp3bC7Fi7GOb5jTpOeK1Yyti6MvCk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)