UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ZnU8R8/wl0KfMkCXAZH0gAFR3Xqlquptmz+VJcZPseo=' 
WHERE 
  key_id = '4b6798bd1c664cf6ebcb4ecee4aa2548343a7f59aba54ce04d780683fe5075ac' 
  AND (
    token = 'ZnU8R8/wl0KfMkCXAZH0gAFR3Xqlquptmz+VJcZPseo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021