UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'F2hwrWTR4iMfjadCkNhgrqMyOOTPRkmMfs6EAAw7nK0=' 
WHERE 
  key_id = 'd02dcf8ecde965fa2a013cb9252e8cddeeb9dc15a5ef07977d9b4d2e04ac9dba' 
  AND (
    token = 'F2hwrWTR4iMfjadCkNhgrqMyOOTPRkmMfs6EAAw7nK0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031