UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eZLpkTnXuiQfPBSJJmcB9Fl3XYcOTJ1r+i2KuX1yHeA=' 
WHERE 
  key_id = '758c3f206ba93e0ee66865ace8c82133c5555a206ece346b69e6b255e749d999' 
  AND (
    token = 'eZLpkTnXuiQfPBSJJmcB9Fl3XYcOTJ1r+i2KuX1yHeA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00049