UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/fJO6HrSNN1gvN9o4TEfXQPP0n8nTu8gv8vXV9KbkN0=' 
WHERE 
  key_id = '2908f428350558180b777a02597432d08a439d50a0f4ebee9d80f205bf6d48ab' 
  AND (
    token = '/fJO6HrSNN1gvN9o4TEfXQPP0n8nTu8gv8vXV9KbkN0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034