UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 't4Xehjdada4cVIBADaUrNwld0ZBGUhprWIWtQSVQeK0=' 
WHERE 
  key_id = '3f567f785c335e0b6808ebe1128da394cafeb77aa6dd382a45216b10d981e1bb' 
  AND (
    token = 't4Xehjdada4cVIBADaUrNwld0ZBGUhprWIWtQSVQeK0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030