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

Query time 0.00039