UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8/ydqAkUg4aIFGHVDlJ3QXdzLTHafweN01T1XPZaMFA=' 
WHERE 
  key_id = '4e36f1395eb048d09efac3cc694c4f6258a8cf6ebc64da8fe1d2e8df7482f671' 
  AND (
    token = '8/ydqAkUg4aIFGHVDlJ3QXdzLTHafweN01T1XPZaMFA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035